<template>
	<view class="flex-container">
		<!-- 	<ad-rewarded-video adpid="1573533392" ></ad-rewarded-video> -->
	<!-- 	<ad unit-id="adunit-2dec9090f17cec3e"></ad> -->
	</view>
</template>
<script>
	import AppMenu from '@/components/app-menu';
	import AppNews from '@/components/app-news';
	export default {
		components: {
			AppNews,
			AppMenu
		},
		data() {
			return {

				newsList: [1, 1, 1, 1],


			};
		},
		mounted() {
			//this.init();


		},

		onShow() {


		},
		methods: {
			init() {
			
				let  rewardedVideoAd  = uni.createRewardedVideoAd({
					adUnitId: 'adunit-dbb0f41bc662c0e7',
					urlCallback: { // 服务器回调透传参数
						userId: 'testuser',
						extra: 'testdata'
					}
				}) // 仅用于HBuilder基座调试 adpid: '1507000689'
				rewardedVideoAd.onLoad(() => {
					
					console.log('onLoad event')
					rewardedVideoAd.show();
					// 当激励视频被关闭时，默认预载下一条数据，加载完成时仍然触发 `onLoad` 事件
				})
				rewardedVideoAd.onError((err) => {
					console.log('onError event', err)
				})
				rewardedVideoAd.onClose((res) => {
					console.log('onClose event', res)
				})
				
			},

		},

		//下拉刷新
		onPullDownRefresh() {

		}
	};
</script>
<style lang="scss" scoped>
	.banner {

		width: 100vw;
		height: 250rpx;
	}

	.notice {
		padding: 0 30rpx;
		height: 100rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.more {
			font-size: 28rpx;

			color: #34c37f;
		}
	}
</style>